/*
 * CollisionModel.hpp
 *
 *  Created on: 09.10.2013
 *      Author: dima
 */

#ifndef COLLISIONMODEL_HPP_
#define COLLISIONMODEL_HPP_



#include <vector>
#include <SDL/SDL.h>



namespace Tanks
{

namespace Model
{
  // Forward declaration
  class GameObjectModel;

  class CollisionModel
  {
  public:

    enum CollisionSide
    {
      CollisionLeft,
      CollisionUp,
      CollisionRight,
      CollisionDown,
      CollisionEnd
    };

    static CollisionModel & getInstance();

    void RegisterObject(GameObjectModel * argGameObject);

    void RemoveObject(GameObjectModel * argGameObject);

    void CheckCollision(GameObjectModel * argGameobject);

  private:

    CollisionModel(){}

    CollisionSide GetCollisionSide(SDL_Rect * argRect1, SDL_Rect * argRect2);

    std::vector<GameObjectModel *> m_registeredObjects;

  };

}

}



#endif /* COLLISIONMODEL_HPP_ */
